package com.app.mymusic.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.app.mymusic.R;
import com.app.mymusic.utils.PreferencesUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SkinSettingActivity extends BasicActivity {

    @BindView(R.id.skin_blue)
    TextView skinBlue;
    @BindView(R.id.skin_yellow)
    TextView skinYellow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_skin_setting);
        ButterKnife.bind(this);
    }


    @OnClick({R.id.skin_blue, R.id.skin_yellow})
    public void onClick(View view) {
        int theme = PreferencesUtils.getInt(this,"theme",R.style.AppTheme1);
        switch (view.getId()) {
            case R.id.skin_blue:
                if(theme!=R.style.AppTheme1){
                    PreferencesUtils.putInt(this,"theme",R.style.AppTheme1);
                    System.exit(0);
                }
                break;
            case R.id.skin_yellow:
                if(theme!=R.style.AppTheme2){
                    PreferencesUtils.putInt(this,"theme",R.style.AppTheme2);
                    System.exit(0);
                }
                break;
        }
    }
}
